<template>
  <div class="header" id="header">
    <div style="display: block" @click="$router.back()">
      <div class="header_back">
        <div class="header_back_r"></div>
      </div>
    </div>
    <div id="head-title">{{ otto }}</div>
    <router-link to="/" class="gb-head-rightwrap" data-ajax="false">
      <div class="header_right">
        <img
          src=""
        />
      </div>
    </router-link>
  </div>
</template>

<script>
export default {
  data() {
    return {
      headr: [{ path: "/list", name: "游戏列表" },
              { path: "/news", name: "消息" },
              { path: "/denlu", name: "登录" },
              { path: "/percenset", name: "设置" },
              {path:"/product/",name:"淘手游交易平台-商品详情"},
              {path:"/sell",name:"发布"},
              {path:"/release",name:"发布"},
             ],
      otto:''
    };
  },
  created () {
    this.headr.forEach(val => {
        if(this.$route.path.indexOf(val.path)!=-1){
          this.otto=val.name
        }
        this.$route.path.indexOf("detail")!=-1?this.otto=sessionStorage.gamesType:''
      });
  },
};
</script>

<style lang="less" scoped>
@import url("../assets/css/top.css");
</style>